package de.hsfulda.et.problemloesen.ws1112.grp2.knapsack;

public class Projekt03 {

    final static String TARGET_DIR = ".//res//";
    final static String BACKPACK_INPUT = "BackpackInput.txt";
    final static String BACKPACK_OUTPUT = "BackpackOutput.csv";
    final static String ULM_INPUT = "UlmerSchachtelnInput.txt";
    final static String ULM_OUTPUT = "UlmerSchachtelnOutput.csv";
    final static String TEST_INPUT = "TestszenarioInput.txt";
    final static String TEST_OUTPUT = "TestszenarioOutput.csv";

    public static void main(String[] args) {

	String sourcepath;
	String destinationpath;

	IO auswahlmenu = IO.getInstance();

	while (true) {
	    auswahlmenu.Auswahl_Rucksackproblem();
	    Knapsack kn;

	    switch (auswahlmenu.getAuswahl_rucksackproblem()) {
	    case IO.ENCODING_PROBLEM_SELECTED:
		kn = new Knapsack(1);
		sourcepath = TARGET_DIR + BACKPACK_INPUT;
		destinationpath = TARGET_DIR + BACKPACK_OUTPUT;
		kn.starten(sourcepath, destinationpath);
		break;
	    case IO.ULM_PROBLEM_SELECTED:
		kn = new Knapsack(1);
		sourcepath = TARGET_DIR + ULM_INPUT;
		destinationpath = TARGET_DIR + ULM_OUTPUT;
		kn.starten(sourcepath, destinationpath);
		break;
	    case IO.TEST_PROBLEM_SELECTED:
		kn = new Knapsack(1);
		sourcepath = TARGET_DIR + TEST_INPUT;
		destinationpath = TARGET_DIR + TEST_OUTPUT;
		kn.starten(sourcepath, destinationpath);
		break;
	    case IO.EXIT_PROBLEM_SELECTED:
		System.out.println("Programm wird beendet.");
		return;
	    default:
		System.out.println("Falsche Eingabe");
		break;
	    }
	}
    }
}
